﻿#region License

/*
 © 2012 Alex Kazaev
 * FolderDrive project [http://folderdrive.codeplex.com/]
 * Licensed under Ms-PL license [http://www.opensource.org/licenses/MS-PL]
 */

#endregion License

namespace FolderDrive.ViewModels
{
  /// <summary>
  /// View model for options control
  /// </summary>
  public class OptionsViewModel : BaseViewModel
  {
    #region properties

    /// <summary>
    /// Gets or sets a value indicating whether the app have to start minimized.
    /// </summary>
    public bool StartMinimized
    {
      get { return Configuration.FolderDriveConfigurationManager.GetStartMinimized(); }
      set
      {
        Configuration.FolderDriveConfigurationManager.SetStartMinimized(value);
        NotifyChanged("StartMinimized");
      }
    }

    /// <summary>
    /// Gets or sets a value indicating whether the drives have to be unmounted on exit.
    /// </summary>
    public bool UnmountOnExit
    {
      get { return Configuration.FolderDriveConfigurationManager.GetUnmountOnExit(); }
      set
      {
        Configuration.FolderDriveConfigurationManager.SetUnmountOnExit(value);
        NotifyChanged("UnmountOnExit");
      }
    }

    /// <summary>
    /// Gets or sets a value indicating whether the drives have to be unmounted on exit.
    /// </summary>
    public bool ShowTooltip
    {
      get { return Configuration.FolderDriveConfigurationManager.GetShowTooltip(); }
      set
      {
        Configuration.FolderDriveConfigurationManager.SetShowTooltip(value);
        NotifyChanged("ShowTooltip");
      }
    }

    /// <summary>
    /// Gets or sets a value indicating whether the program should check for updates on startup.
    /// </summary>
    public bool CheckUpdates
    {
        get { return Configuration.FolderDriveConfigurationManager.GetCheckUpdates(); }
        set
        {
            Configuration.FolderDriveConfigurationManager.SetCheckUpdates(value);
            NotifyChanged("CheckUpdates");
        }
    }

    /// <summary>
    /// Gets or sets a value indicating whether the program should minimize on close.
    /// </summary>
    public bool MinimizeOnClose
    {
        get { return Configuration.FolderDriveConfigurationManager.GetMinOnClose(); }
        set
        {
            Configuration.FolderDriveConfigurationManager.SetMinOnClose(value);
            NotifyChanged("MinimizeOnClose");
        }
    }

    #endregion properties
  }
}